<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EOS.IO: contracts/eoslib/print.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="eos-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EOS.IO
   &#160;<span id="projectnumber">DAWN3.0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_ae9b15dd87e066e1908bbd90e8f38627.html">contracts</a></li><li class="navelem"><a class="el" href="dir_3fea0bf1ce879ce73e6ecec98007efcd.html">eoslib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">print.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="print_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="print_8h.html">eoslib/print.h</a>&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="types_8hpp.html">eoslib/types.hpp</a>&gt;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="math_8hpp.html">eoslib/math.hpp</a>&gt;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeosio.html">eosio</a> {</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;   static_assert( <span class="keyword">sizeof</span>(<span class="keywordtype">long</span>) == <span class="keyword">sizeof</span>(<span class="keywordtype">int</span>), <span class="stringliteral">&quot;unexpected size difference&quot;</span> );</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="namespaceeosio.html#aa0a56fe314d032d027a1565d93a68b21">   19</a></span>&#160;   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespaceeosio.html#aa0a56fe314d032d027a1565d93a68b21">print</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* ptr ) {</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;      <a class="code" href="group__consolecapi.html#gaa99be0cc1b9e5cbbc2b12a43537e7ed3">prints</a>(ptr);</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;   }</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="namespaceeosio.html#a9bdf0bd18006f43820d73ec9f8cc50b8">   28</a></span>&#160;   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespaceeosio.html#aa0a56fe314d032d027a1565d93a68b21">print</a>( <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> num ) {</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;      <a class="code" href="group__consolecapi.html#ga23902e1572b43c290fed01d9ae736a78">printi</a>(num);</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;   }</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="namespaceeosio.html#a0c95ab36e2c3f91a627270c09ff9140f">   37</a></span>&#160;   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespaceeosio.html#aa0a56fe314d032d027a1565d93a68b21">print</a>( <a class="code" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> num ) {</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;      <a class="code" href="group__consolecapi.html#ga23902e1572b43c290fed01d9ae736a78">printi</a>(num);</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;   }</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="namespaceeosio.html#ad0342d58fa17a7bea359607c6cfcf0cf">   46</a></span>&#160;   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespaceeosio.html#aa0a56fe314d032d027a1565d93a68b21">print</a>( <span class="keywordtype">int</span> num ) {</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;      <a class="code" href="group__consolecapi.html#ga23902e1572b43c290fed01d9ae736a78">printi</a>(num);</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;   }</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="namespaceeosio.html#a3c85835d3c6e556b5da524030e70e971">   55</a></span>&#160;   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespaceeosio.html#aa0a56fe314d032d027a1565d93a68b21">print</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> num ) {</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;      <a class="code" href="group__consolecapi.html#ga23902e1572b43c290fed01d9ae736a78">printi</a>(num);</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;   }</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="namespaceeosio.html#a632b6538d9a2d090957c51c265bb8268">   64</a></span>&#160;   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespaceeosio.html#aa0a56fe314d032d027a1565d93a68b21">print</a>( <a class="code" href="structeosio_1_1uint128.html">uint128</a> num ) {</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;      <a class="code" href="group__consolecapi.html#ga0ac41ae1c31cf87a4adc14d9edb3e6a5">printi128</a>((<a class="code" href="group__types.html#ga396787e5ec029b1205bd3e4cd9763e7d">uint128_t</a>*)&amp;num);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;   }</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="namespaceeosio.html#acbb116ac61f216fafa100011bce090ee">   73</a></span>&#160;   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespaceeosio.html#aa0a56fe314d032d027a1565d93a68b21">print</a>( <a class="code" href="group__types.html#ga396787e5ec029b1205bd3e4cd9763e7d">uint128_t</a> num ) {</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;      <a class="code" href="group__consolecapi.html#ga0ac41ae1c31cf87a4adc14d9edb3e6a5">printi128</a>((<a class="code" href="group__types.html#ga396787e5ec029b1205bd3e4cd9763e7d">uint128_t</a>*)&amp;num);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;   }</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="namespaceeosio.html#addacdc539ef6e6fb4f55bf04d1a0d22c">   82</a></span>&#160;   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespaceeosio.html#aa0a56fe314d032d027a1565d93a68b21">print</a>( <a class="code" href="structeosio_1_1name.html">name</a> <a class="code" href="structeosio_1_1name.html">name</a> ) {</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;      <a class="code" href="group__consolecapi.html#ga9ec6a2d163a27b98984065d55fb41475">printn</a>(name.<a class="code" href="structeosio_1_1name.html#a1662a43923d636c4c149f588c52e2d14">value</a>);</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;   }</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="namespaceeosio.html#a3b7dd9bbca5a20bad3acb94b6b7354be">   86</a></span>&#160;   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespaceeosio.html#aa0a56fe314d032d027a1565d93a68b21">print</a>( <span class="keywordtype">bool</span> val ) {</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;      <a class="code" href="group__consolecapi.html#gaa99be0cc1b9e5cbbc2b12a43537e7ed3">prints</a>(val?<span class="stringliteral">&quot;true&quot;</span>:<span class="stringliteral">&quot;false&quot;</span>);</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;   }</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;   <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="namespaceeosio.html#aa09d15641c76813eea61b876d8266400">   91</a></span>&#160;   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespaceeosio.html#aa0a56fe314d032d027a1565d93a68b21">print</a>( T&amp;&amp; t ) {</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;      t.print();</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;   }</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;   <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Arg, <span class="keyword">typename</span>... Args&gt;</div><div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="group__console_cppapi.html#ga56f9111930e3c8ee043a8502ab35c342">  136</a></span>&#160;   <span class="keywordtype">void</span> <a class="code" href="namespaceeosio.html#aa0a56fe314d032d027a1565d93a68b21">print</a>( Arg a, Args... args ) {</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;      <a class="code" href="namespaceeosio.html#aa0a56fe314d032d027a1565d93a68b21">print</a>(a);</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;      <a class="code" href="namespaceeosio.html#aa0a56fe314d032d027a1565d93a68b21">print</a>(args...);</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;   }</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="classeosio_1_1iostream.html">  144</a></span>&#160;   <span class="keyword">class </span><a class="code" href="classeosio_1_1iostream.html">iostream</a> {};</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;   <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="group__console_cppapi.html#ga827f0aac6315e7963bcd52656cd7eeed">  163</a></span>&#160;   <span class="keyword">inline</span> <a class="code" href="classeosio_1_1iostream.html">iostream</a>&amp; <a class="code" href="namespaceeosio.html#a260b28d50d78aebe5b9cdc25c3a5619c">operator&lt;&lt;</a>( <a class="code" href="classeosio_1_1iostream.html">iostream</a>&amp; out, <span class="keyword">const</span> T&amp; v ) {</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;      <a class="code" href="namespaceeosio.html#aa0a56fe314d032d027a1565d93a68b21">print</a>( v );</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;      <span class="keywordflow">return</span> out;</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;   }</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;   <span class="keyword">static</span> <a class="code" href="classeosio_1_1iostream.html">iostream</a> cout;</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;}</div><div class="ttc" id="namespaceeosio_html"><div class="ttname"><a href="namespaceeosio.html">eosio</a></div><div class="ttdoc">Used to forward declare raw functions. </div><div class="ttdef"><b>Definition:</b> account.hpp:12</div></div>
<div class="ttc" id="group__types_html_gaaa5d1cd013383c889537491c3cfd9aad"><div class="ttname"><a href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a></div><div class="ttdeci">unsigned long long uint64_t</div><div class="ttdef"><b>Definition:</b> types.h:18</div></div>
<div class="ttc" id="classeosio_1_1iostream_html"><div class="ttname"><a href="classeosio_1_1iostream.html">eosio::iostream</a></div><div class="ttdef"><b>Definition:</b> print.hpp:144</div></div>
<div class="ttc" id="types_8hpp_html"><div class="ttname"><a href="types_8hpp.html">types.hpp</a></div></div>
<div class="ttc" id="group__consolecapi_html_ga9ec6a2d163a27b98984065d55fb41475"><div class="ttname"><a href="group__consolecapi.html#ga9ec6a2d163a27b98984065d55fb41475">printn</a></div><div class="ttdeci">void printn(uint64_t name)</div><div class="ttdoc">Prints a 64 bit names as base32 encoded string. </div></div>
<div class="ttc" id="group__consolecapi_html_gaa99be0cc1b9e5cbbc2b12a43537e7ed3"><div class="ttname"><a href="group__consolecapi.html#gaa99be0cc1b9e5cbbc2b12a43537e7ed3">prints</a></div><div class="ttdeci">void prints(const char *cstr)</div><div class="ttdoc">Prints string. </div></div>
<div class="ttc" id="group__types_html_ga06896e8c53f721507066c079052171f8"><div class="ttname"><a href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a></div><div class="ttdeci">unsigned long uint32_t</div><div class="ttdef"><b>Definition:</b> types.h:19</div></div>
<div class="ttc" id="math_8hpp_html"><div class="ttname"><a href="math_8hpp.html">math.hpp</a></div></div>
<div class="ttc" id="namespaceeosio_html_a260b28d50d78aebe5b9cdc25c3a5619c"><div class="ttname"><a href="namespaceeosio.html#a260b28d50d78aebe5b9cdc25c3a5619c">eosio::operator&lt;&lt;</a></div><div class="ttdeci">datastream&lt; Stream &gt; &amp; operator&lt;&lt;(datastream&lt; Stream &gt; &amp;ds, const uint256 d)</div><div class="ttdoc">Serialize a uint256. </div><div class="ttdef"><b>Definition:</b> datastream.hpp:137</div></div>
<div class="ttc" id="namespaceeosio_html_aa0a56fe314d032d027a1565d93a68b21"><div class="ttname"><a href="namespaceeosio.html#aa0a56fe314d032d027a1565d93a68b21">eosio::print</a></div><div class="ttdeci">void print(const char *ptr)</div><div class="ttdoc">Prints string. </div><div class="ttdef"><b>Definition:</b> print.hpp:19</div></div>
<div class="ttc" id="print_8h_html"><div class="ttname"><a href="print_8h.html">print.h</a></div></div>
<div class="ttc" id="structeosio_1_1uint128_html"><div class="ttname"><a href="structeosio_1_1uint128.html">eosio::uint128</a></div><div class="ttdoc">A struct that wraps uint128 integer and defines common operator overloads. </div><div class="ttdef"><b>Definition:</b> math.hpp:66</div></div>
<div class="ttc" id="group__consolecapi_html_ga0ac41ae1c31cf87a4adc14d9edb3e6a5"><div class="ttname"><a href="group__consolecapi.html#ga0ac41ae1c31cf87a4adc14d9edb3e6a5">printi128</a></div><div class="ttdeci">void printi128(const uint128_t *value)</div><div class="ttdoc">Prints value as a 128 bit unsigned integer. </div></div>
<div class="ttc" id="structeosio_1_1name_html"><div class="ttname"><a href="structeosio_1_1name.html">eosio::name</a></div><div class="ttdoc">wraps a uint64_t to ensure it is only passed to methods that expect a Name </div><div class="ttdef"><b>Definition:</b> types.hpp:73</div></div>
<div class="ttc" id="group__types_html_ga396787e5ec029b1205bd3e4cd9763e7d"><div class="ttname"><a href="group__types.html#ga396787e5ec029b1205bd3e4cd9763e7d">uint128_t</a></div><div class="ttdeci">unsigned __int128 uint128_t</div><div class="ttdef"><b>Definition:</b> types.h:17</div></div>
<div class="ttc" id="group__consolecapi_html_ga23902e1572b43c290fed01d9ae736a78"><div class="ttname"><a href="group__consolecapi.html#ga23902e1572b43c290fed01d9ae736a78">printi</a></div><div class="ttdeci">void printi(uint64_t value)</div><div class="ttdoc">Prints value as a 64 bit unsigned integer. </div></div>
<div class="ttc" id="structeosio_1_1name_html_a1662a43923d636c4c149f588c52e2d14"><div class="ttname"><a href="structeosio_1_1name.html#a1662a43923d636c4c149f588c52e2d14">eosio::name::value</a></div><div class="ttdeci">account_name value</div><div class="ttdef"><b>Definition:</b> types.hpp:78</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
